<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Spoilage extends Model
{
    use HasFactory;
    protected $guarded=[];
    protected $table='spoilage';

    public function product()
    {
        return $this->hasOne(Products::class,'id','product_id');
    }

    public function admin()
    {
        return $this->hasOne(Admins::class,'id','admin_id');
    }
}
